<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>物业缴费订单</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript" src="${ctxStatic}/echart/echarts.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            test();
        });
        function test() {
            var myChart = echarts.init(document.getElementById("echart"));
            /* require(
             [   'echarts',
             'echarts/chart/line'
             ],
             //回调函数
             DrawEChart
             );*/
            var one=${one};
            var two=${two};
            var three=${three};
            var six=${six};
            var maxMony=${maxMoney};
            /* $.ajax({
             url: '${ctx}/sys/tenementPayInfoController/getHistroyPicture',
             data: {},
             dataType: 'json',
             cache: false,
             async: false,
             success: function (data) {
             if (data.length > 0) {
             var item=data[0];
             one=item.one;
             two=item.two;
             three=item.three;
             six=item.six;
             maxMony=item.maxMony
             } else {
             alert("没有物业缴费信息");
             }

             }
             });*/
            var option = {
                title : {
                    text: '每天的物业缴费总额',
                    subtext: '',
                    x:'center'
                },
                tooltip : {
                    trigger: 'item',
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                legend: {//1 支付宝 2微信 3现金 4物业钱包 5麻雀钱包 0 其他
                    orient : 'vertical',
                    x : 'left',
                    data:['一个月','二个月','三个月','半年']
                },
                toolbox: {
                    show : true,
                    feature : {
                        mark : {show: true},
                        dataView : {show: true, readOnly: false},
                        magicType : {
                            show: true,
                            type: ['pie', 'funnel'],
                            option: {
                                funnel: {
                                    x: '25%',
                                    width: '50%',
                                    funnelAlign: 'left',
                                    max: maxMony
                                }
                            }
                        },
                        restore : {show: true},
                        saveAsImage : {show: true}
                    }
                },
                calculable : true,
                series : [
                    {
                        name:'访问来源',
                        type:'pie',
                        radius : '55%',
                        center: ['50%', '60%'],
                        data:[//'支付宝','微信','现金','物业钱包','麻雀钱包','其他'
                            {value:one, name:'一个月'},
                            {value:two, name:'二个月'},
                            {value:three, name:'三个月'},
                            {value:six, name:'半年'},
                        ]
                    }
                ]
            };
            myChart.setOption(option);


        }
    </script>
    <style>
        .pic1{
            width:400px;
            height:400px;
            margin: 20px auto;
        }
    </style>
    <script type="text/javascript">
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").attr("action", "${ctx}/sys/tenementPayInfoController/communityTenementFee");
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/sys/tenementPayInfoController/communityTenementFee">物业缴费记录</a></li>
</ul>
<div id="echart" class="pic1"></div>
<form:form id="searchForm" modelAttribute="tbUserTenementInfo"  action="${ctx}/sys/tenementPayInfoController/communityTenementFee"
           method="post" class="breadcrumb form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <%--<li><label>省：</label><form:input path="provinceName" htmlEscape="false" maxlength="50" class="input-medium"/> </li>&nbsp;&nbsp;
    <li><label>市：</label><form:input path="cityName" htmlEscape="false" maxlength="50" class="input-medium"/> </li>&nbsp;&nbsp;--%>
<li><label>小区：</label><form:input path="commName" htmlEscape="false" maxlength="50" class="input-medium"/> </li>&nbsp;&nbsp;
<li><label>联系人：</label><form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/> </li>&nbsp;&nbsp;
<li><label>联系方式：</label><form:input path="mobile" htmlEscape="false" maxlength="50" class="input-medium"/></li>&nbsp;&nbsp;
&nbsp;&nbsp;
<li>
    <label>日期范围：&nbsp;</label>
    <input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20"
           class="input-mini Wdate" value="<fmt:formatDate value="${tbUserTenementInfo.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
    --&nbsp;<input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
                   value="<fmt:formatDate value="${tbUserTenementInfo.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>&nbsp;&nbsp;
</li>
<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
    </form:form>
    <span><font style="color: #00A6C7">${message1}</font></span>
    <table id="contentTable" class="table table-striped table-bordered table-condensed">
        <thead>
        <tr>
            <th>省</th>
            <th>市</th>
            <th>小区</th>
            <th>单元号</th>
            <th>业主姓名</th>
            <th>业主电话</th>
            <th>房屋平米数</th>
            <th>每平米物业费</th>
            <th>缴费月数</th>
            <th>物业费总额</th>
            <th>缴费总额</th>
            <th>缴费缴费时间</th>
            <th>是否返现</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${page.list}" var="tbUserTenementInfo">
            <tr>
                <td>${tbUserTenementInfo.provinceName}</td>
                <td>${tbUserTenementInfo.cityName}</td>
                <td>${tbUserTenementInfo.commName}</td>
                <td>${tbUserTenementInfo.showName}</td>
                <td>${tbUserTenementInfo.name}</td>
                <td>${tbUserTenementInfo.mobile}</td>
                <td>${tbUserTenementInfo.coveredArea}</td>
                <td>${tbUserTenementInfo.propertyFee}</td>
                <td>${tbUserTenementInfo.month}</td>
                <td>${tbUserTenementInfo.teneFee}</td>
                <td>${tbUserTenementInfo.money}</td>
                <td><fmt:formatDate value="${tbUserTenementInfo.createTime}" type="both"/></td>
                <td>
                    <c:choose>
                        <c:when test="${tbUserTenementInfo.backFlag==1}">是</c:when>
                        <c:when test="${tbUserTenementInfo.backFlag==0}">否</c:when>
                    </c:choose>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="pagination">${page}</div>
</body>
</html>
